<?php
/**
 * Created by PhpStorm.
 * User: zhao shou qiang
 * Date: 2018/2/27
 * Time: 15:07
 */

use yii\helpers\Html;
use yii\helpers\Url;
use yii\widgets\ActiveForm;
use backend\assets\AppAsset;

?>

<input type="hidden" id="upload_excel_modal" data-toggle="modal" data-target="#uploadProjectExcelModal"/>

<!-- 上传模态框开始（Modal） -->
    <div class="modal fade" id="uploadProjectExcelModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
         aria-hidden="false">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header clearfix">
                    <div class="pull-left">
                        <?php echo Html::img('@web/image/officeHall/uploadAssetPackage/mask.png', ['class' => 'pull-left maskImg']); ?>
                        <span class="pull-left uploadText">上传项目清单</span>
                    </div>
                    <?php echo Html::img('@web/image/officeHall/uploadAssetPackage/clos.png',
                        ['class' => 'pull-right uploadImg', 'data-dismiss' => 'modal', 'aria-hidden' => 'true', 'tilte' => '单击关闭遮罩层', 'style' => 'margin-top: 10px; cursor:pointer;']); ?>
                </div>

                <div class="modal-body">
                    <div class="fileBox">
                    <div class="importDebtorList">
                        <div class="box">
                            <ul class="clearfix">

                                <?php $form = ActiveForm::begin([
                                    'action' => ['package/upload'],
                                    'method' => 'post',
                                    'id' => 'myModalUpload',
                                    'options' => [
                                        'enctype' => 'multipart/form-data' //文件上传时添加该编码
                                    ]
                                ]); ?>

                                <li class="pull-left ListUpLoadListBtn" id="continue_upload">
                                    <?php echo Html::img('@web/image/officeHall/uploadAssetPackage/upLoadListBtn.png', ['alt' => '单击上传']); ?>
                                </li>

                                <li class="pull-left ListUpLoadListBtn">
                                </li>
                                <?php ActiveForm::end() ?>

                                <form enctype="multipart/form-data" id="upload_excel">
                                    <div class="form-group">
                                        <div class="file-loading">
                                            <input id="input-20" name="UploadForm[xlsFile]" type="file" class="file" data-min-file-count="1"
                                                   data-show-preview="false" ><!-- ata-show-preview="false" data-overwrite-initial="false"-->
                                        </div>
                                    </div>
                                </form>
                            </ul>

                            <div class="text">
                                <p class="promptOne">
                                    1. 仅支持模板文件上传;
                                </p>
                                <p class="promptTwo">
                                    2.点击下载
                                    <?php echo Html::a('资产包债务清单上传模板.xlsx', ['package/download']); ?>
                                    补充并上传。
                                </p>
                            </div>
                        </div>
                    </div>
                    </div>
                </div>


                <div class="modal-footer">
                    <div class="uploadyn cancelInConfirm">
                        <input id='cancel' class="active" data-dismiss="modal" aria-hidden="true" type="button" value="确定"/>
                        <input id="confirm" type="button" data-dismiss="modal" aria-hidden="true" value="取消"/>

                        <input type="hidden" name="host" id="host" value="<?php echo Yii::$app->request->hostInfo . '/'; ?>">
                        <input type="hidden" id="uploadUrl" value="<?php echo \yii\helpers\Url::toRoute('package/upload-modal', true) ?>"/>
                        <input type="hidden" id="delExcelUrl" value="<?php echo \yii\helpers\Url::toRoute('package/del-excel', true) ?>"/>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--上传模态框结束-->



    <!-- 删除模态框开始（Modal） -->
    <div class="container-fluid text-center package_upload_excel">
        <div class="row">
            <div class="modal fade" id="deleModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
                 aria-hidden="false">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header clearfix">
                            <div class="pull-left">
                                <?php echo Html::img('@web/image/officeHall/uploadAssetPackage/mask.png', ['class' => 'pull-left']); ?>
                                <span class="pull-left uploadText">删除选项</span>
                            </div>
                            <?php echo Html::img('@web/image/officeHall/uploadAssetPackage/clos.png',
                                ['class' => 'pull-right uploadImg', 'data-dismiss' => 'modal', 'aria-hidden' => 'true', 'title' => '单击关闭遮罩层', 'style' => 'margin-top: 10px; cursor: pointer;']); ?>
                        </div>
                        <div class="modal-body">
                            <p>您确定删除吗?</p>
                        </div>
                        <div class="modal-footer" style="display: block;">
                            <div class="cancelInConfirm">
                                <input id='modal-confirm' class="cancelInConfirmActive investigation_modal_delete"
                                       type="button" value="确定" data-dismiss="modal"/>
                                <input id="modal-cancel" class="active" type="button" value="取消" data-dismiss="modal"/>
                                <input type="hidden" class="model_upload_excel" value="">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <input type="hidden" id="delete_excel_modal" data-toggle="modal" data-target="#deleModal"/>
    <!--删除模态框结束-->